Skip to contentSkip to conversation

Change in openvpn[master]: dns: add updown script for macOS

Openvpn-devel In review d12fk (Code Review) 2 participants 8 messages Jun 13, 2025 – Jun 21, 2025 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): gerrit.1749787477000.Iade06a8454ccf53668deef61f07217ead8ec6c63@...2715...

#1 lore raw

Attention is currently required from: flichtenheld, plaisthos.

Hello plaisthos, flichtenheld,

I'd like you to do a code review.
Please visit

    http://gerrit.openvpn.net/c/openvpn/+/1062?usp=email

to review the following change.

Change subject: dns: add updown script for macOS
......................................................................

dns: add updown script for macOS

Change-Id Iade06a8454ccf53668deef61f07217ead8ec6c63

---
M configure.ac
M distro/dns-scripts/Makefile.am
A distro/dns-scripts/macos-dns-updown.sh

3 files changed, 218 insertions(+), 2 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/62/1062/1

configure.ac +1 -2
index 8bdec32..02b45f8 100644
@@ -364,8 +364,7 @@
 	*-*-darwin*)
 		AC_DEFINE([TARGET_DARWIN], [1], [Are we running on Mac OS X?])
 		AC_DEFINE_UNQUOTED([TARGET_PREFIX], ["M"], [Target prefix])
-		AM_CONDITIONAL([ENABLE_DNS_UPDOWN], [false])
-		AC_SUBST([DNS_UPDOWN_TYPE], ["resolvconf_file"])
+		AC_SUBST([DNS_UPDOWN_TYPE], ["macos"])
 		have_tap_header="yes"
 		ac_cv_type_struct_in_pktinfo=no
 		;;
distro/dns-scripts/Makefile.am +1 -0
index 9fcd3f7..e3f9043 100644
@@ -12,6 +12,7 @@
 	$(srcdir)/Makefile.in
 
 EXTRA_DIST = \
+	macos-dns-updown.sh \
 	systemd-dns-updown.sh \
 	openresolv-dns-updown.sh \
 	haikuos_file-dns-updown.sh \
distro/dns-scripts/macos-dns-updown.sh new file +216 -0

216 lines not on this page · raw message

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1062?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Iade06a8454ccf53668deef61f07217ead8ec6c63
Gerrit-Change-Number: 1062
Gerrit-PatchSet: 1
Gerrit-Owner: d12fk <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-MessageType: newchange

#2 lore raw
In reply to a message not in the archive

Attention is currently required from: d12fk, flichtenheld.

plaisthos has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/1062?usp=email )

Change subject: dns: add updown script for macOS
......................................................................

Patch Set 1: Code-Review-1

(1 comment)

Patchset:

PS1:
In my tests the split DNS works nicely. However, pushing just a normal DNS server with this script active just results in no working DNS at all anymore.

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1062?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Iade06a8454ccf53668deef61f07217ead8ec6c63
Gerrit-Change-Number: 1062
Gerrit-PatchSet: 1
Gerrit-Owner: d12fk <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Attention: d12fk <[email protected]...>
Gerrit-Comment-Date: Tue, 17 Jun 2025 12:21:36 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment

#3 lore raw
In reply to a message not in the archive

Attention is currently required from: d12fk, flichtenheld, plaisthos.

Hello flichtenheld, plaisthos,

I'd like you to reexamine a change. Please visit

    http://gerrit.openvpn.net/c/openvpn/+/1062?usp=email

to look at the new patch set (#2).

The following approvals got outdated and were removed:
Code-Review-1 by plaisthos

Change subject: dns: add updown script for macOS
......................................................................

dns: add updown script for macOS

Change-Id Iade06a8454ccf53668deef61f07217ead8ec6c63

---
M configure.ac
M distro/dns-scripts/Makefile.am
A distro/dns-scripts/macos-dns-updown.sh

3 files changed, 219 insertions(+), 2 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/62/1062/2

configure.ac +1 -2
index 8bdec32..02b45f8 100644
@@ -364,8 +364,7 @@
 	*-*-darwin*)
 		AC_DEFINE([TARGET_DARWIN], [1], [Are we running on Mac OS X?])
 		AC_DEFINE_UNQUOTED([TARGET_PREFIX], ["M"], [Target prefix])
-		AM_CONDITIONAL([ENABLE_DNS_UPDOWN], [false])
-		AC_SUBST([DNS_UPDOWN_TYPE], ["resolvconf_file"])
+		AC_SUBST([DNS_UPDOWN_TYPE], ["macos"])
 		have_tap_header="yes"
 		ac_cv_type_struct_in_pktinfo=no
 		;;
distro/dns-scripts/Makefile.am +1 -0
index 9fcd3f7..e3f9043 100644
@@ -12,6 +12,7 @@
 	$(srcdir)/Makefile.in
 
 EXTRA_DIST = \
+	macos-dns-updown.sh \
 	systemd-dns-updown.sh \
 	openresolv-dns-updown.sh \
 	haikuos_file-dns-updown.sh \
distro/dns-scripts/macos-dns-updown.sh new file +217 -0

217 lines not on this page · raw message

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1062?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Iade06a8454ccf53668deef61f07217ead8ec6c63
Gerrit-Change-Number: 1062
Gerrit-PatchSet: 2
Gerrit-Owner: d12fk <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Attention: d12fk <[email protected]...>
Gerrit-MessageType: newpatchset

#4 lore raw
In reply to a message not in the archive

Attention is currently required from: d12fk, flichtenheld.

plaisthos has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/1062?usp=email )

Change subject: dns: add updown script for macOS
......................................................................

Patch Set 3: Code-Review+2

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1062?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Iade06a8454ccf53668deef61f07217ead8ec6c63
Gerrit-Change-Number: 1062
Gerrit-PatchSet: 3
Gerrit-Owner: d12fk <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Attention: d12fk <[email protected]...>
Gerrit-Comment-Date: Sat, 21 Jun 2025 11:05:54 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment

#5 lore raw

PATCH v3 1/1 dns: add updown script for macOS

In reply to a message not in the archive

From: Heiko Hund <[email protected]...>

Change-Id Iade06a8454ccf53668deef61f07217ead8ec6c63

---

This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1062
This mail reflects revision 3 of this Change.

Acked-by according to Gerrit (reflected above):
Arne Schwabe <[email protected]...>

configure.ac +1 -2
index 8bdec32..02b45f8 100644
@@ -364,8 +364,7 @@
 	*-*-darwin*)
 		AC_DEFINE([TARGET_DARWIN], [1], [Are we running on Mac OS X?])
 		AC_DEFINE_UNQUOTED([TARGET_PREFIX], ["M"], [Target prefix])
-		AM_CONDITIONAL([ENABLE_DNS_UPDOWN], [false])
-		AC_SUBST([DNS_UPDOWN_TYPE], ["resolvconf_file"])
+		AC_SUBST([DNS_UPDOWN_TYPE], ["macos"])
 		have_tap_header="yes"
 		ac_cv_type_struct_in_pktinfo=no
 		;;
distro/dns-scripts/Makefile.am +1 -0
index 9fcd3f7..e3f9043 100644
@@ -12,6 +12,7 @@
 	$(srcdir)/Makefile.in
 
 EXTRA_DIST = \
+	macos-dns-updown.sh \
 	systemd-dns-updown.sh \
 	openresolv-dns-updown.sh \
 	haikuos_file-dns-updown.sh \
distro/dns-scripts/macos-dns-updown.sh new file +217 -0

217 lines not on this page · raw message

#6 lore raw

[Openvpn-devel] [PATCH applied] Re: dns: add updown script for macOS

I have not tested this myself, just stared a bit at the code if there are surprises lurking ("unquoted eval" and such).

Arne has tested "all DNS via VPN" (was broken in v2) and "split DNS" and both work. So here we go, more test reports welcome.

Your patch has been applied to the master branch.

commit a4db3c6e22fd48b83cc38a644762e33e0894b69b

Author: Heiko Hund
Date:   Sat Jun 21 14:12:54 2025 +0200
     dns: add updown script for macOS

     Signed-off-by: Heiko Hund <[email protected]...>
     Acked-by: Arne Schwabe <[email protected]...>
     Message-Id: <[email protected]...>
     URL: https://www.mail-archive.com/[email protected]/msg31942.html
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering

#7 lore raw
In reply to a message not in the archive

cron2 has uploaded a new patch set (#4) to the change originally created by d12fk. ( http://gerrit.openvpn.net/c/openvpn/+/1062?usp=email )

The following approvals got outdated and were removed:
Code-Review+2 by plaisthos

Change subject: dns: add updown script for macOS
......................................................................

dns: add updown script for macOS

Change-Id Iade06a8454ccf53668deef61f07217ead8ec6c63

Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg31942.html

---
M configure.ac
M distro/dns-scripts/Makefile.am
A distro/dns-scripts/macos-dns-updown.sh

3 files changed, 219 insertions(+), 2 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/62/1062/4

configure.ac +1 -2
index 8bdec32..02b45f8 100644
@@ -364,8 +364,7 @@
 	*-*-darwin*)
 		AC_DEFINE([TARGET_DARWIN], [1], [Are we running on Mac OS X?])
 		AC_DEFINE_UNQUOTED([TARGET_PREFIX], ["M"], [Target prefix])
-		AM_CONDITIONAL([ENABLE_DNS_UPDOWN], [false])
-		AC_SUBST([DNS_UPDOWN_TYPE], ["resolvconf_file"])
+		AC_SUBST([DNS_UPDOWN_TYPE], ["macos"])
 		have_tap_header="yes"
 		ac_cv_type_struct_in_pktinfo=no
 		;;
distro/dns-scripts/Makefile.am +1 -0
index 9fcd3f7..e3f9043 100644
@@ -12,6 +12,7 @@
 	$(srcdir)/Makefile.in
 
 EXTRA_DIST = \
+	macos-dns-updown.sh \
 	systemd-dns-updown.sh \
 	openresolv-dns-updown.sh \
 	haikuos_file-dns-updown.sh \
distro/dns-scripts/macos-dns-updown.sh new file +217 -0

217 lines not on this page · raw message

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1062?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Iade06a8454ccf53668deef61f07217ead8ec6c63
Gerrit-Change-Number: 1062
Gerrit-PatchSet: 4
Gerrit-Owner: d12fk <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: newpatchset

#8 lore raw
In reply to a message not in the archive

cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/1062?usp=email )

Change subject: dns: add updown script for macOS
......................................................................

dns: add updown script for macOS

Change-Id Iade06a8454ccf53668deef61f07217ead8ec6c63

Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg31942.html

---
M configure.ac
M distro/dns-scripts/Makefile.am
A distro/dns-scripts/macos-dns-updown.sh

3 files changed, 219 insertions(+), 2 deletions(-)
configure.ac +1 -2
index 8bdec32..02b45f8 100644
@@ -364,8 +364,7 @@
 	*-*-darwin*)
 		AC_DEFINE([TARGET_DARWIN], [1], [Are we running on Mac OS X?])
 		AC_DEFINE_UNQUOTED([TARGET_PREFIX], ["M"], [Target prefix])
-		AM_CONDITIONAL([ENABLE_DNS_UPDOWN], [false])
-		AC_SUBST([DNS_UPDOWN_TYPE], ["resolvconf_file"])
+		AC_SUBST([DNS_UPDOWN_TYPE], ["macos"])
 		have_tap_header="yes"
 		ac_cv_type_struct_in_pktinfo=no
 		;;
distro/dns-scripts/Makefile.am +1 -0
index 9fcd3f7..e3f9043 100644
@@ -12,6 +12,7 @@
 	$(srcdir)/Makefile.in
 
 EXTRA_DIST = \
+	macos-dns-updown.sh \
 	systemd-dns-updown.sh \
 	openresolv-dns-updown.sh \
 	haikuos_file-dns-updown.sh \
distro/dns-scripts/macos-dns-updown.sh new file +217 -0

217 lines not on this page · raw message

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1062?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Iade06a8454ccf53668deef61f07217ead8ec6c63
Gerrit-Change-Number: 1062
Gerrit-PatchSet: 4
Gerrit-Owner: d12fk <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: merged